import request from '@/utils/request'

export function getRoleListApi (params) {
  return request({
    url: '/sys/role',
    method: 'get',
    params
  })
}

export function updateRoleApi (data) {
  return request({
    url: `/sys/role/${data.id}`,
    method: 'put',
    data
  })
}

export function addRoleApi (data) {
  return request({
    url: `/sys/role`,
    method: 'POST',
    data
  })
}

export function delRoleApi (id) {
  return request({
    url: `/sys/role/${id}`,
    method: 'DELETE'
  })
}

export function getCompanyApi (id) {
  return request({
    url: `/company/${id}`,
    method: 'GET'
  })
}
